using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Drawing.Drawing2D;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Data;
using System.Security.Cryptography;
using System.IO;

namespace OpenComposite.Mapper
{
	#region Class: GlobalElementType
    public class GlobalElementType
	{
		public GlobalElementType(string name, XmlSchemaObject type)
		{
			this.name = name;
			this.type = type;
		}

		public override string ToString()
		{
			return name;
		}

		public string Get()
		{
			return name;
		}

		public void Set(string name)
		{
			this.name = name;
		}

		public string name;
		public XmlSchemaObject type;
	}
	#endregion

    public class ConfigSMTPInputData
    {
        private string _smtpserver;
		private string _smtpuser;
        private string _smtppassword;

        public string SMTPServer
        {
            get { return this._smtpserver; }
            set { this._smtpserver = value; }
        }
        public string SMTPUser
        {
            get { return this._smtpuser; }
            set { this._smtpuser = value; }
		}
		public string SMTPPassword
		{
			get { return this._smtppassword; }
			set { this._smtppassword = value; }
		}
		public string SMTPSender { get; set; }
    }

    [Serializable]
    [XmlRoot(Namespace = "http://www.OpenComposite.com/internal")]
    [XmlType(Namespace = "http://www.OpenComposite.com/internal")]
    public class ConfigData
    {
        private List<Config> _xmlDataField = new List<Config>();

        public Config[] Configurations
        {
            get { return this._xmlDataField.ToArray(); }
            set { 
                this._xmlDataField.Clear();
                this._xmlDataField.AddRange(value);
            }
        }
        
        [XmlIgnore]
        public List<Config> XmlData
        {
            get { return _xmlDataField; }
        }
        
    }

    [Serializable]
    [XmlType(Namespace = "http://www.OpenComposite.com/internal")]
    public class Config
    {
        public Config(string cName, string recipient, string subject, string message, string media)
        {
            this._cName = cName;
            this._recipient = recipient;
            this._subject = subject;
            this._message = message;
            this._mediaType = media;
        }
        
        public Config()
        {

        }

        private string _cName;
        private string _recipient;
        private string _subject;
        private string _message;
        private string _mediaType;

        public string ConfigName
        {
            get { return this._cName; }
            set { this._cName = value; }
        }

        public string Recipient
        {
            get { return this._recipient; }
            set { this._recipient = value; }
        }

        public string Subject
        {
            get { return this._subject; }
            set { this._subject = value; }
        }

        public string Message
        {
            get { return this._message; }
            set { this._message = value; }
        }

        public string MediaType
        {
            get { return this._mediaType; }
            set { this._mediaType = value; }
        }

    }

}